import requests

url = "http://icdhc.cn:8080/documents/34"
header = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36",
    "Cookie":"autologin=8916193aa59c5bddda05d1e8d3651519029f19cc; _redmine_session=N1dPTktCejg0LzQ2QTl2RHNMNWdUZHdNQWV2VXBnZzUyU1p6RHB4T3FSR3hISkI2TE0xVjVsRGhPeFFSU09SKzBLRXRoM2JLTHdzSGhpRDN1aHdxL2tyZi9vT0VwWlhrVDFmNFBxeFN6OENBbDlyTWRIeXVDYk5jYXpsUFRkdnpmRVFsTTZsY0E2VFQ2Q2FBbnR4SkNCSDk3WDZuUnBTeUJyTkp1RnlxZExIUTVaRkg2R014OFhmYzVNdlZma0pmbG9MQmRndmFBZ2FVc2lqSW82cDlERFd3dGd4L3BFUHJpRlZMVEFvZ0ZObHhBYnhWb3llQWV0U0hRaEMrbThxVzB5MlJobFBmVGxlK2wzQjNQNm9jOGc9PS0tMldjZjVIRUlMRUo1enNLeHAxREszZz09--a6861026ce9d6e781e6909850fb26ed0068754fc"
}

#因为https 是有第三方CA证书认证的
#但是12306 虽然是https 但是他不是CA证书 他是自己颁布的证书
#解决方法：告诉web忽略证书访问  verify=False
response = requests.get(url, headers=header)
data = response.content.decode('utf-8')
print(data)

# with open('ssl.html',mode='w',encoding='utf-8') as file:
#     file.write(data)
